/*
* Copyright 2016 YONYOU Corporation Ltd. All Rights Reserved.
*
* This software is published under the terms of the YONYOU Software
* License version 1.0, a copy of which has been included with this
* distribution in the LICENSE.txt file.
*
* @Project         marketing

* @Package         com.yonyou.marketing.message.push.resolver

* @Author          LuZhen

* @FileName        MessageProtocalChecker

* @Date            16/11/3

----------------------------------------------------------------------------------
*     Date          Who             Version         Comments
* 1. 16/11/3        LuZhen          1.0             Create Source
*
----------------------------------------------------------------------------------
*/
package com.yonyou.gmmc.service.wechatpush.provider;

import com.yonyou.gmmc.service.wechatpush.resolver.PushMessage;

/**
 * 协议适配器，不同的协议有不同的实现
 */
public interface MessageProvideAdapter {


    /**
     * 推送消息
     * @param   pushMessage   PushMessage
     * @return  ProviderMessage
     */
    ProviderMessage trans2Provider(PushMessage pushMessage);

    /**
     * 推送消息,以SPI方式调用实际的provider
     * @param   providerMessage   ProviderMessage
     * @return  boolean
     */
    MessagePushResult push2Provider(ProviderMessage providerMessage);

}
